.class public abstract Les/fb;
.super Ljava/lang/Object;
.source "PixelsWriter.java"


# instance fields
.field protected final a:Lcom/esfile/screen/recorder/picture/pngj/c;

.field protected final b:I

.field protected final c:I

.field protected final d:I

.field private e:Les/cb;

.field protected f:I

.field protected g:I

.field protected h:Z

.field protected i:Lcom/esfile/screen/recorder/picture/pngj/FilterType;

.field private j:[I

.field private k:Ljava/io/OutputStream;

.field private l:I

.field protected m:I


# direct methods
.method public constructor <init>(Lcom/esfile/screen/recorder/picture/pngj/c;)V
    .locals 1

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    const/4 v0, 0x6

    .line 2
    iput v0, p0, Les/fb;->f:I

    const/4 v0, 0x0

    .line 3
    iput v0, p0, Les/fb;->g:I

    .line 4
    iput-boolean v0, p0, Les/fb;->h:Z

    const/4 v0, 0x5

    new-array v0, v0, [I

    .line 5
    iput-object v0, p0, Les/fb;->j:[I

    const/16 v0, 0x7d00

    .line 6
    iput v0, p0, Les/fb;->l:I

    .line 7
    iput-object p1, p0, Les/fb;->a:Lcom/esfile/screen/recorder/picture/pngj/c;

    .line 8
    iget v0, p1, Lcom/esfile/screen/recorder/picture/pngj/c;->k:I

    iput v0, p0, Les/fb;->d:I

    add-int/lit8 v0, v0, 0x1

    .line 9
    iput v0, p0, Les/fb;->b:I

    .line 10
    iget p1, p1, Lcom/esfile/screen/recorder/picture/pngj/c;->j:I

    iput p1, p0, Les/fb;->c:I

    const/4 p1, -0x1

    .line 11
    iput p1, p0, Les/fb;->m:I

    .line 12
    sget-object p1, Lcom/esfile/screen/recorder/picture/pngj/FilterType;->FILTER_DEFAULT:Lcom/esfile/screen/recorder/picture/pngj/FilterType;

    iput-object p1, p0, Les/fb;->i:Lcom/esfile/screen/recorder/picture/pngj/FilterType;

    return-void
.end method


# virtual methods
.method public a()V
    .locals 1

    .line 20
    iget-object v0, p0, Les/fb;->e:Les/cb;

    if-eqz v0, :cond_0

    .line 21
    invoke-virtual {v0}, Les/cb;->close()V

    :cond_0
    return-void
.end method

.method public a(I)V
    .locals 0

    .line 25
    iput p1, p0, Les/fb;->l:I

    return-void
.end method

.method public final a(Lcom/esfile/screen/recorder/picture/pngj/FilterType;)V
    .locals 0

    .line 24
    iput-object p1, p0, Les/fb;->i:Lcom/esfile/screen/recorder/picture/pngj/FilterType;

    return-void
.end method

.method public final a(Ljava/io/OutputStream;)V
    .locals 0

    .line 23
    iput-object p1, p0, Les/fb;->k:Ljava/io/OutputStream;

    return-void
.end method

.method public a(Ljava/lang/Integer;)V
    .locals 0

    .line 22
    invoke-virtual {p1}, Ljava/lang/Integer;->intValue()I

    move-result p1

    iput p1, p0, Les/fb;->f:I

    return-void
.end method

.method protected abstract a([B)V
.end method

.method protected final a(Lcom/esfile/screen/recorder/picture/pngj/FilterType;[B[B[B)[B
    .locals 6

    .line 1
    sget-object v0, Lcom/esfile/screen/recorder/picture/pngj/FilterType;->FILTER_NONE:Lcom/esfile/screen/recorder/picture/pngj/FilterType;

    if-ne p1, v0, :cond_0

    move-object p4, p2

    .line 2
    :cond_0
    iget v0, p1, Lcom/esfile/screen/recorder/picture/pngj/FilterType;->val:I

    int-to-byte v0, v0

    const/4 v1, 0x0

    aput-byte v0, p4, v1

    .line 3
    sget-object v0, Les/fb$a;->a:[I

    invoke-virtual {p1}, Ljava/lang/Enum;->ordinal()I

    move-result v2

    aget v0, v0, v2

    const/4 v2, 0x1

    if-eq v0, v2, :cond_8

    const/4 v3, 0x2

    if-eq v0, v3, :cond_6

    const/4 v1, 0x3

    if-eq v0, v1, :cond_4

    const/4 v1, 0x4

    if-eq v0, v1, :cond_2

    const/4 v1, 0x5

    if-ne v0, v1, :cond_1

    .line 4
    :goto_0
    iget p1, p0, Les/fb;->d:I

    if-gt v2, p1, :cond_8

    .line 5
    aget-byte p1, p2, v2

    aget-byte v0, p3, v2

    sub-int/2addr p1, v0

    int-to-byte p1, p1

    aput-byte p1, p4, v2

    add-int/lit8 v2, v2, 0x1

    goto :goto_0

    .line 6
    :cond_1
    new-instance p2, Lcom/esfile/screen/recorder/picture/pngj/PngjOutputException;

    new-instance p3, Ljava/lang/StringBuilder;

    invoke-direct {p3}, Ljava/lang/StringBuilder;-><init>()V

    const-string p4, "Filter type not recognized: "

    invoke-virtual {p3, p4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p3, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    invoke-virtual {p3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    invoke-direct {p2, p1}, Lcom/esfile/screen/recorder/picture/pngj/PngjOutputException;-><init>(Ljava/lang/String;)V

    throw p2

    :cond_2
    const/4 p1, 0x1

    .line 7
    :goto_1
    iget v0, p0, Les/fb;->c:I

    if-gt p1, v0, :cond_3

    .line 8
    aget-byte v0, p2, p1

    aget-byte v1, p3, p1

    and-int/lit16 v1, v1, 0xff

    div-int/2addr v1, v3

    sub-int/2addr v0, v1

    int-to-byte v0, v0

    aput-byte v0, p4, p1

    add-int/lit8 p1, p1, 0x1

    goto :goto_1

    :cond_3
    add-int/2addr v0, v2

    const/4 p1, 0x1

    .line 9
    :goto_2
    iget v1, p0, Les/fb;->d:I

    if-gt v0, v1, :cond_8

    .line 10
    aget-byte v1, p2, v0

    aget-byte v4, p3, v0

    and-int/lit16 v4, v4, 0xff

    aget-byte v5, p2, p1

    and-int/lit16 v5, v5, 0xff

    add-int/2addr v4, v5

    div-int/2addr v4, v3

    sub-int/2addr v1, v4

    int-to-byte v1, v1

    aput-byte v1, p4, v0

    add-int/lit8 v0, v0, 0x1

    add-int/2addr p1, v2

    goto :goto_2

    :cond_4
    const/4 p1, 0x1

    .line 11
    :goto_3
    iget p3, p0, Les/fb;->c:I

    if-gt p1, p3, :cond_5

    .line 12
    aget-byte p3, p2, p1

    aput-byte p3, p4, p1

    add-int/lit8 p1, p1, 0x1

    goto :goto_3

    :cond_5
    add-int/2addr p3, v2

    const/4 p1, 0x1

    .line 13
    :goto_4
    iget v0, p0, Les/fb;->d:I

    if-gt p3, v0, :cond_8

    .line 14
    aget-byte v0, p2, p3

    aget-byte v1, p2, p1

    sub-int/2addr v0, v1

    int-to-byte v0, v0

    aput-byte v0, p4, p3

    add-int/lit8 p3, p3, 0x1

    add-int/2addr p1, v2

    goto :goto_4

    :cond_6
    const/4 p1, 0x1

    .line 15
    :goto_5
    iget v0, p0, Les/fb;->c:I

    if-gt p1, v0, :cond_7

    .line 16
    aget-byte v0, p2, p1

    aget-byte v3, p3, p1

    and-int/lit16 v3, v3, 0xff

    invoke-static {v0, v1, v3, v1}, Lcom/esfile/screen/recorder/picture/pngj/f;->a(IIII)I

    move-result v0

    int-to-byte v0, v0

    aput-byte v0, p4, p1

    add-int/lit8 p1, p1, 0x1

    goto :goto_5

    :cond_7
    add-int/2addr v0, v2

    const/4 p1, 0x1

    .line 17
    :goto_6
    iget v1, p0, Les/fb;->d:I

    if-gt v0, v1, :cond_8

    .line 18
    aget-byte v1, p2, v0

    aget-byte v3, p2, p1

    and-int/lit16 v3, v3, 0xff

    aget-byte v4, p3, v0

    and-int/lit16 v4, v4, 0xff

    aget-byte v5, p3, p1

    and-int/lit16 v5, v5, 0xff

    .line 19
    invoke-static {v1, v3, v4, v5}, Lcom/esfile/screen/recorder/picture/pngj/f;->a(IIII)I

    move-result v1

    int-to-byte v1, v1

    aput-byte v1, p4, v0

    add-int/lit8 v0, v0, 0x1

    add-int/2addr p1, v2

    goto :goto_6

    :cond_8
    return-object p4
.end method

.method protected b()Lcom/esfile/screen/recorder/picture/pngj/FilterType;
    .locals 5

    .line 5
    iget-object v0, p0, Les/fb;->a:Lcom/esfile/screen/recorder/picture/pngj/c;

    iget-boolean v1, v0, Lcom/esfile/screen/recorder/picture/pngj/c;->g:Z

    if-nez v1, :cond_4

    iget v1, v0, Lcom/esfile/screen/recorder/picture/pngj/c;->c:I

    const/16 v2, 0x8

    if-ge v1, v2, :cond_0

    goto :goto_0

    .line 6
    :cond_0
    invoke-virtual {v0}, Lcom/esfile/screen/recorder/picture/pngj/c;->a()J

    move-result-wide v0

    const-wide/16 v2, 0x400

    cmp-long v4, v0, v2

    if-gez v4, :cond_1

    .line 7
    sget-object v0, Lcom/esfile/screen/recorder/picture/pngj/FilterType;->FILTER_NONE:Lcom/esfile/screen/recorder/picture/pngj/FilterType;

    return-object v0

    .line 8
    :cond_1
    iget-object v0, p0, Les/fb;->a:Lcom/esfile/screen/recorder/picture/pngj/c;

    iget v1, v0, Lcom/esfile/screen/recorder/picture/pngj/c;->b:I

    const/4 v2, 0x1

    if-ne v1, v2, :cond_2

    .line 9
    sget-object v0, Lcom/esfile/screen/recorder/picture/pngj/FilterType;->FILTER_SUB:Lcom/esfile/screen/recorder/picture/pngj/FilterType;

    return-object v0

    .line 10
    :cond_2
    iget v0, v0, Lcom/esfile/screen/recorder/picture/pngj/c;->a:I

    if-ne v0, v2, :cond_3

    .line 11
    sget-object v0, Lcom/esfile/screen/recorder/picture/pngj/FilterType;->FILTER_UP:Lcom/esfile/screen/recorder/picture/pngj/FilterType;

    return-object v0

    .line 12
    :cond_3
    sget-object v0, Lcom/esfile/screen/recorder/picture/pngj/FilterType;->FILTER_PAETH:Lcom/esfile/screen/recorder/picture/pngj/FilterType;

    return-object v0

    .line 13
    :cond_4
    :goto_0
    sget-object v0, Lcom/esfile/screen/recorder/picture/pngj/FilterType;->FILTER_NONE:Lcom/esfile/screen/recorder/picture/pngj/FilterType;

    return-object v0
.end method

.method public final b([B)V
    .locals 1

    .line 1
    iget-boolean v0, p0, Les/fb;->h:Z

    if-nez v0, :cond_0

    .line 2
    invoke-virtual {p0}, Les/fb;->e()V

    .line 3
    :cond_0
    iget v0, p0, Les/fb;->m:I

    add-int/lit8 v0, v0, 0x1

    iput v0, p0, Les/fb;->m:I

    .line 4
    invoke-virtual {p0, p1}, Les/fb;->a([B)V

    return-void
.end method

.method public final c()Lcom/esfile/screen/recorder/picture/pngj/FilterType;
    .locals 1

    .line 3
    iget-object v0, p0, Les/fb;->i:Lcom/esfile/screen/recorder/picture/pngj/FilterType;

    return-object v0
.end method

.method protected c([B)V
    .locals 3

    .line 1
    iget-object v0, p0, Les/fb;->e:Les/cb;

    array-length v1, p1

    const/4 v2, 0x0

    invoke-virtual {v0, p1, v2, v1}, Les/cb;->write([BII)V

    .line 2
    iget-object v0, p0, Les/fb;->j:[I

    aget-byte p1, p1, v2

    aget v1, v0, p1

    add-int/lit8 v1, v1, 0x1

    aput v1, v0, p1

    return-void
.end method

.method public abstract d()[B
.end method

.method protected final e()V
    .locals 1

    .line 1
    iget-boolean v0, p0, Les/fb;->h:Z

    if-nez v0, :cond_0

    .line 2
    invoke-virtual {p0}, Les/fb;->f()V

    const/4 v0, 0x1

    .line 3
    iput-boolean v0, p0, Les/fb;->h:Z

    :cond_0
    return-void
.end method

.method protected f()V
    .locals 8

    .line 1
    new-instance v1, Lcom/esfile/screen/recorder/picture/pngj/a;

    iget-object v0, p0, Les/fb;->k:Ljava/io/OutputStream;

    iget v2, p0, Les/fb;->l:I

    invoke-direct {v1, v0, v2}, Lcom/esfile/screen/recorder/picture/pngj/a;-><init>(Ljava/io/OutputStream;I)V

    .line 2
    iget-object v0, p0, Les/fb;->e:Les/cb;

    if-nez v0, :cond_0

    .line 3
    new-instance v7, Les/db;

    iget v2, p0, Les/fb;->b:I

    iget-object v0, p0, Les/fb;->a:Lcom/esfile/screen/recorder/picture/pngj/c;

    .line 4
    invoke-virtual {v0}, Lcom/esfile/screen/recorder/picture/pngj/c;->b()J

    move-result-wide v3

    iget v5, p0, Les/fb;->f:I

    iget v6, p0, Les/fb;->g:I

    move-object v0, v7

    invoke-direct/range {v0 .. v6}, Les/db;-><init>(Lcom/esfile/screen/recorder/picture/pngj/a;IJII)V

    iput-object v7, p0, Les/fb;->e:Les/cb;

    :cond_0
    return-void
.end method

.method public g()Z
    .locals 3

    .line 1
    iget v0, p0, Les/fb;->m:I

    iget-object v1, p0, Les/fb;->a:Lcom/esfile/screen/recorder/picture/pngj/c;

    iget v1, v1, Lcom/esfile/screen/recorder/picture/pngj/c;->b:I

    const/4 v2, 0x1

    sub-int/2addr v1, v2

    if-ne v0, v1, :cond_0

    goto :goto_0

    :cond_0
    const/4 v2, 0x0

    :goto_0
    return v2
.end method
